package com.ht.demo.admin.controller.system;

import com.ht.demo.common.appexception.ResultData;
import com.ht.demo.service.manager.system.CaptchaManager;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;

@RestController
@RequestMapping("${basePath}")
public class CaptchaController {

    @Resource
    private CaptchaManager captchaManager;

    @GetMapping("/captchaImage")
    public ResultData createCaptcha(HttpServletResponse response) {
        return captchaManager.createCaptcha();
    }


}
